<template>
  <div class="my">
    <h1>{{ msg }},{{msg1}}</h1>
    <input v-model="msg">
    <input type="button" @click="test(msg,msg1)">
    <div v-for="list in msgList">{{list}}</div>
  </div>
</template>

<script>
  export default {
    name: 'My',
    data () {
      return {
        msg: 'Welcome to ZYN Vue.js App',
        msgList: ['商品1------商品2', '商品3------商品4', '商品5------商品6', '商品7------商品8', '商品9------商品10']
      }
    },
    methods: {
      test (param, param1) {
        console.log(param, param1)
        this.msg = 'hello'
      }
    }
  }
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
  h1, h2 {
    font-weight: normal;
  }

  ul {
    list-style-type: none;
    padding: 0;
  }

  li {
    display: inline-block;
    margin: 0 10px;
  }

  a {
    color: #42b983;
  }
</style>
